<template>
  <div>
  <div>列表</div>
  <button @click="toLogin">跳转登录</button>
</div>
</template>

<script>
export default {
  methods: {
    toLogin() {
      this.$router.push({
        // name: "/Login",
        path: "/login",
        params:{
          name: "黑马"
        }
        //params传参的缺点  页面刷新参数会丢失  一般用不到params传参
      });
    },
  },
};
</script>

<style>
</style>